<template>
  <table v-if="getWait && getWait.length"   cellpadding="0"  cellspacing="0" class="oa-classify__table">
    <tr class="oa-classify__hd">
        <td width="40%">事务编号</td>
        <td width="10%">发起人</td>
        <td width="15%">当前步骤</td>
        <td width="15%">接收时间</td>
        <td>发起时间</td>
        <td style="width:60px">操作</td>
    </tr>
    <tr v-for=" ( item, index ) in getWait " :key="index" class="sp-section__list-group">
      <td @click="lookFunc(item)">
        <div>
          {{item.approve_name}}{{item.code}}
        </div>
        <span class="oa-classify__sub">{{item.reason}}</span>
      </td>
      <td>{{item.truename}}</td>
      <td>{{item.node_name}}</td>
      <td>{{item.received_at}}</td>
      <td>{{item.created_at}}</td>
      <td><el-button type="primary" @click="lookFunc(item)">查看</el-button></td>
    </tr>
  </table>
</template>
<script>
export default {
  props: ['getWait'],
  methods: {
    lookFunc (item) {
      console.log(JSON.stringify(item))
      window.localStorage.setItem('approve', JSON.stringify(item))
      this.$router.push({ name: 'oaMain', query: { approve: item, from: 'db', active: 3 } })
    }
  }
}
</script>
